//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.lyq.bean.mySql;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class SeekElected_Sql {
    public SeekElected_Sql() {
    }

    public Boolean seekExist_Sql(String cNo, String sNo) {
        (new MysqlLinking()).getLink();
        Connection conn = MysqlLinking.conn;
        Boolean bool = false;
        if (conn != null) {
            try {
                String sql = "select * from electcourse where C_No=? and S_No=?";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, cNo);
                ps.setString(2, sNo);

                for(ResultSet rs = ps.executeQuery(); rs.next(); bool = true) {
                }
            } catch (Exception var8) {
                Exception e = var8;
                e.printStackTrace();
            }
        } else {
            System.out.println("数据库连接错误！");
        }

        return bool;
    }
}
